package cn.lutu.lutu.controller;

import cn.lutu.lutu.response.ResultVO;
import cn.lutu.lutu.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @date 2023-06-03
 * @author luoyinhan
 * */
@RestController
@RequestMapping("/v1/category/")
public class CategoryController {
    @Autowired
    CategoryService categoryService;

    @GetMapping("")
    public ResultVO getNames(){
        return ResultVO.ok(categoryService.getCategories());
    }
}
